package org.nnxy.foodboot.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 推荐记录实体类
 */
@Data
@TableName("recommendation_record")
public class RecommendationRecord {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    private Integer userId;
    
    private Integer recipeId;
    
    private LocalDateTime recommendationTime;
    
    private String recommendationType;
    
    private String recommendationReason;
    
    private Boolean isClicked;
    
    private LocalDateTime clickTime;
    
    private String userFeedback;
    
    private LocalDateTime feedbackTime;
    
    /**
     * 推荐分数，用于排序推荐结果
     */
    private Double score;
    
    @TableLogic
    private String delFlag;
    
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;
    
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    // 非数据库字段
    @TableField(exist = false)
    private User user;
    
    @TableField(exist = false)
    private Recipe recipe;
} 